# Fibonacci number module


def fib(n):  # write Fibonacci series up to n
    a = 0
    b = 1
    while a < n:
        print(a, end=' ')
        c = b
        b = a + b
        a = c

    print()


def fib2(n):  # return Fibonacci series up to n
    result = []
    a = 0
    b = 1
    while a < n:
        result.append(a)
        c = b
        b = a + b
        a = c
    return result
